package com.yanqu.road.entity.wingroom;

import com.yanqu.road.entity.DataObject;

import java.util.Map;
import java.util.Objects;


/**
 * @author ：zfr
 * @date ：2022/1/21 15:52
 */
public class UserWingRoomPlan extends DataObject {
    //玩家id
    private long userId;
    //蓝图id
    private long planUid;
    //蓝图命名
    private String planName;
    //区域家具摆放情况
    private Map<Integer, WingRoomRegion> regionMap;
    //是否删除
    private boolean isDelete;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getPlanUid() {
        return planUid;
    }

    public void setPlanUid(long planUid) {
        this.planUid = planUid;
    }

    public Map<Integer, WingRoomRegion> getRegionMap() {
        return regionMap;
    }

    public void setRegionMap(Map<Integer, WingRoomRegion> regionMap) {
        this.regionMap = regionMap;
        setUpdateOption();
    }

    public String getPlanName() {
        return planName;
    }

    public void setPlanName(String planName) {
        if (!Objects.equals(this.planName, planName)) {
            this.planName = planName;
            setUpdateOption();
        }
    }

    public boolean isDelete() {
        return isDelete;
    }

    public void setDelete(boolean delete) {
        if (isDelete != delete) {
            isDelete = delete;
            setUpdateOption();
        }
    }
}
